<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateWorkTaskLinkTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('work_task_link', function(Blueprint $table)
		{
            $table->engine = 'InnoDB';
			$table->uuid('id')->primary('id');
			$table->uuid('task_id')->comment('任务ID');
			$table->uuid('linktask_id')->comment('相关联任务ID');
			$table->tinyInteger('link_type')->comment('关联类型【相关、重复、阻碍】');
			$table->text('link_remark')->nullable();
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('work_task_link');
	}

}
